The online racing simulator
Searching in All forums
(951 results)
Yisc[NL]
S3 licensed
Quote from ScottLy :If you give one penalty, and a second one
2nd one will overwrite 1st penalty

I dont think that its possible to give 2 penalties at the same time. Or Am I Wrong?

You are right about that, but I think I have come up with a way to solve that issue, as in "storing the second penalty for later on".
Just haven't got the time to work it out tonight, so will come back to the subject in the next few days.
Oval lights controller - V1.01
Yisc[NL]
S3 licensed
Small update (V1.01) to this script with the following change log:

-Made the main lights blink left one / right one on command !ylw
-Added code to switch off actions on Yellow when going straight into !grn

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Have a go with the attached script.
It does all that you asked for, except the blinking yellow lights on main, as there is no yellow state on them.
So made them blink red.

I've put the commands !ylw , !rdy , !grn under my F5,F6,F7 (you need to do that in your own LFS settings (see screenshot) and it's working as intended.

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
I've found a bug in this addon.
When using command "!dsoff" or "!rds" the following error is logged:

Syntax error: Incorrect number of arguments at line #154 in function 'closedragresults' script aborted

The problem is in file 'Drag_Finish.lpr' at line 154 which is:

Sub CloseDragResults($keyflags,$id)

This line should be changed to:

Sub CloseDragResults()
Points system V1.05
Yisc[NL]
S3 licensed
Changelog Points system V1.05

-Added code to send a global message when a player receives 1 point for completing a lap

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Points system V1.04
Yisc[NL]
S3 licensed
Changelog Points system V1.04

-Added code to give one point for every completed lap
-Added code for a ranking system
-Added code to delete stored rank when using !delpoints command
-Added code to cap maximum number of points at 50000
-Added code to make rank visible when using !point and !rank command
-Fixed a bug in !point and !rank where Flagnear wasn't working

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
Quote from Tomfuel :a friend team has a fully fonctionnal server in RS with 6.0.1.3
version
i want the same ...

RS does not want to change if i can't provide them a download link

This is the download link for Lapper 7.0.6.3: https://www.lfs.net/attachment/189673
Yisc[NL]
S3 licensed
I am sure you want this version to be released (soon) at some point, but I like to make a request for this or next version.

To be able to use CarBehind in the OnPlayerFlags event.
The needed information is in the InSim packet:


struct IS_FLG // FLaG (yellow or blue flag changed)
{
byte Size; // 8
byte Type; // ISP_FLG
byte ReqI; // 0
byte PLID; // player's unique id

byte OffOn; // 0 = off / 1 = on
byte Flag; // 1 = given blue / 2 = causing yellow
byte CarBehind; // unique id of obstructed player
byte Sp3;
};

Last edited by Yisc[NL], .
Points system V1.03
Yisc[NL]
S3 licensed
Changelog Points system V1.03

- Removed "$ps_max_points=10" from OnLapperStart as it no longer has a purpose
- Made the display of points earned dynamic
- Added option (only for admins) to delete all points related records from the database

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.
Yisc[NL]
S3 licensed
I have looked into your script and it turned out that an ENDIF was missing.
There was also too much complicated code to make the rank-cases work, so I have re-written that:


<?php 
SWITCH( $command )

    CASE 
"!promote":
    IF ( 
UserIsAdmin$userName ) == )
    
THEN
        
IF ( $argv != "" 
        
THEN
        $idxSpace 
indexOf$argv" ");
        IF ( 
$idxSpace != -
        
THEN
            $pl_name 
subStr$argv,0,$idxSpace ); #user- or nickname
            
$rank trimsubStr$argv,$idxSpace ) ); #rank

            
IF ( $rank != "")
            
THEN
                
SWITCH ( ToLower($rank) )    

                CASE 
"cadet":
                    
privMsg"test" );
                    IF ( 
UserInGroup"Police",$pl_name ) == )
                    
THEN
                        privMsg
"^7User is already A Officer!!!");
                    ELSE
                        
MoveUserToGroup"Police",$pl_name );
                        
UserGroupToFile"Police"$Dir["Police"] );
                        
GlobalMsglangEngine"%{cruise_cop_new}%",$pl_name) );
                    ENDIF
                BREAK;

                CASE 
"officer":
                    
privMsg"test Officer");
                BREAK;

                CASE 
"oc":
                    
privMsg"test OC");
                BREAK;
                ENDSWITCH
            ELSE
            
privMsg"Select player" );
            ENDIF
        ENDIF
        ELSE
        
privMsg "Specify Cadet, Officer or OC" );
        ENDIF
    ENDIF 
#THIS WAS MISSING
    
BREAK;
ENDSWITCH
?>

Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
This is a question about Lapper and should have gone into the Lapper forum section. Maybe a moderator can direct this thread to the correct forum?
I will look into your question and will come up with an answer.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Quote from Vilix :I see. I did not know that it was developed by a single person, which explains a bit about the development speed. However, I disagree with the statement that "it's being developed to make the best simulator possible." Wouldn't you agree that by adding things like weather conditions and minor details like concrete cracks would make it a better simulator? As you said I'm not a complete expert on LFS, but from a casual players perspective this is my opinion.

Day/night , weather , visual improvements would add to the overal feeling the game has, but it won't make it a better simulator.
The new tyre model that is being developed will.
If all goes to plan, the next update (no promises, no estimate when it will be read) should include the new tyre mode, day/night cycle and moving DirectX up to version 11 (coming from 9), which will give the graphics artist (Erik) a lot more options, while he has already given most tracks (every track when the new update goes live) a huge graphical update.

You might want to read these articles, written by Scawen:

https://www.lfs.net/forum/thread/94032-March-Progress-Report---LFS-in-Direct3D-11
https://www.lfs.net/forum/thread/93766-December-Progress-Report%3A-South-City
https://www.lfs.net/forum/thread/93689-October-Progress-Report
https://www.lfs.net/forum/thread/93569-July-Progress-Report
https://www.lfs.net/report-aug2018-bl
https://www.lfs.net/report-dec2018-au

It shows you how much is going on and what has been worked on.
LFS is very much alive, but with a single developer and one graphics artist, things go slow, but steady and with always the highest quality possible in mind.
https://www.lfs.net/forum/thread/93420-April-Progress-Report
Yisc[NL]
S3 licensed
I have stopped reading after point 1a. You clearly have no idea how LFS is developed (by a single guy) and that it isn't being developed to make as much money as possible, but to make the best simulator possible.

Modding has been suggested many times before and Scawen (dev of LFS) has said that at the moment he has no intention to open up the game for officially supported mods or modding of the game.
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
Changelog Points system V1.02

- Added code to give extra points to the player that drove the fastest lap of the race (Yisc[NL])
- Removed several lines of closeGlobalButton, since the button ID's that were closed were not in use (Yisc[NL])

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.

Credits to:

Tim NL - For creating the initial script
Bass-Driver - For making the code to show a toplist
Last edited by Yisc[NL], .
Yisc[NL]
S3 licensed
I seems that Rackservice deploys 6.0.1.3 by default as I just had another user reporting that version to me.
Strange, as that's a really old version.
Yisc[NL]
S3 licensed
Quote from sinanju :I use Rackservice too Smile

Just checked, and the version of lapper I'm using on Rackservice is V6.0.1.3.

Don't know if anyone else on Rackservice is using a newer version, or if we're all using same one.

I use Filezilla to transfer files back and forth between Rackservice and my pc when I want to update and backup. I used Filezilla to download copy of the lfslapper.exe file, then checked properties.

That's a very old version.
Tomfuel is on 7.0.6.3 , which is the most recent stable version of Lapper.
Yisc[NL]
S3 licensed
The messages are just the messages and can never trigger a race start, unless some other code is active to do such thing. If you want me to, I can have a look at the full script and see if I can find what causes these starts. Feel free to send me a private message, so I can share my email address with you, which then allows you to send me your script (or if you have multiple ones, the full Lapper directory).

Welcome text needs to go into the OnConnect event.
I made this for the team (AB.nl) I am developing things for:

Welcome screen
Lapper Points system
Yisc[NL]
S3 licensed
I have converted the script made by Tim NL into a Lapper module and adjusted the code if needed (some functions he used, have been removed from Lapper).
Here's the new module, that has been tested by me, but needs the score of a couple of people to see if it is really working like it should.

Change the extension of the file to .lpr and add it to addonsused.lpr to be able to use it.

Credits to:

Tim NL - For creating the initial script
Bass-Driver - For making the code to show a toplist
Yisc[NL]
S3 licensed
Are you sure that is caused by Lapper?
I mean, people can just vote to start a race, which is an LFS function and not a Lapper function.
The code you disabled hasn't got anything to do with starting a race.

globalMsg = messages send to everyone who is on the server
privMsg = messages send to that particular player, who triggered the event
Yisc[NL]
S3 licensed
Help given, no feedback, thread closed.
Yisc[NL]
S3 licensed
Over night I have been thinking about how this blue flag penalty could be implemented, but it doesn't seem to be a straight forward thing.

When a player is slow for a reason (skills, technical issue on the car, been in an accident, etc.) the whole field will lap him/her at some point. That means a lot of blue flags will be given, but only counting them isn't doing justice to the player that gets them. I mean, maybe he/she moves out of the way ASAP but since then the next car will appear, the flag count will go up and up. A way to go around that is to count the number of flags within a given time period, but then again, when all the cars are catching up, it still might be too many flags within X seconds.

As far as I know, Lapper can't indicate which players causes you to get a blue flag. It would help to be able to know that Player A gets a blue flag because of Player B and if those are too many, you could apply a penalty. Then the counting starts again when Player A gets a blue flag because of Player C.
I have no idea if there's an Insim packet to get that information and if so, if Bass-Driver would be willing to implement it.
Yisc[NL]
S3 licensed
Quote from Tomfuel :great Yisc Thumbs up, i will try it but where are the penalties and no idea to create it !
i will search and submit

You can give penalties with these commands:


cmdLFS( "/p_30 " . GetCurrentPlayerVar( "UserName" ) );
cmdLFS( "/p_45 " . GetCurrentPlayerVar( "UserName" ) );
cmdLFS( "/p_dt " . GetCurrentPlayerVar( "UserName" ) );
cmdLFS( "/p_sg " . GetCurrentPlayerVar( "UserName" ) );

Penalties:

/p_30 USERNAME :give 30 second time penalty
/p_45 USERNAME :give 45 second time penalty
/p_dt USERNAME :give drive through penalty
/p_sg USERNAME :give stop-go penalty
Yisc[NL]
S3 licensed
Quote from Tomfuel :i'm lost ..
so i can give automatic penalties for no-respect x quantity of Blueflag in 7.0.6.3 ?

if ok ...i do not see any penalties in your examples Looking

Yeah you can, but you have to write the code your self.
I have just pointed you towards the right event to put that piece of code into.
Yisc[NL]
S3 licensed
Quote from Tomfuel :Shrug i do not find the "onPlayerflags" on LFSLapper.lpr and see no way to put many of flags a player can have in the other files before a penalty, i don't find the line to choose penalty for repeating Blue flag
Frown

ps : i dont know what version LFSLapper.lpr i have cause i also have the message on top "Lapperscript dedevelopment , something with a message system" .. and the only way to solve it is to ask a friend Lapper.lpr which do not have this message to replace mine with it.

The flags are found in lfslapper.lpr (I have version 7.0.4.10 , which isn't the latest version but in a higher version it is as well), see this:


#########################################################################################
#Action on Event when player receives a Flag (Yellow/Blue flags and Lag/Missing packets)#
#########################################################################################
# The Flags below returns 1 or 0 depends on which flag is received by the user
#$YellowFlag: Player receives a YellowFlag
#$BlueFlag : Player recieves a BlueFlag
#$LagFlag : Player is lagging or is missing carpackets
#$Time : ShortTimeFormat,same as GetLapperVar("ShortTime");

##########################################################################################

$PlayerFlagEvent = -1; #Enable Event 1 = ON / -1 = OFF
Event OnPlayerFlags($userName,$YellowFlag,$BlueFlag,$LagFlag,$Time) # Player event
/*
IF( $YellowFlag == 1) THEN
privmsg("^3YELLOW FLAG");
ENDIF
IF( $BlueFlag == 1) THEN
privmsg("^4BLUE FLAG");
ENDIF
IF( $LagFlag == 1) THEN
privmsg("^5LAG");
ENDIF
*/
EndEvent

This /* and this */ means that the code between those two signs is disabled.
Remove both of them and the code will be active on the next reload of Lapper, that can be done by typing this into the LFS chat (if you have admin rights on Lapper, that is): !reload

To get rid of "LAPPERSCRIP DEVELOPEMENT" search for this piece of code in lfslapper.lpr:


#################################################
#Connect messages when a player joins the server#
#################################################

Event OnConnect( $userName ) # Player event
/*
$NickName = GetCurrentPlayerVar("NickName");
$Posabs = GetCurrentPlayerVar("PosAbs");
$Groupqual = GetCurrentPlayerVar("GroupQual");
openPrivButton( "welc",25,50,150,15,12,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );
openPrivButton( "pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual ) );
openPrivButton( "clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
openPrivButton( "ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
*/

openPrivButton( "welc",0,0,200,5,12,-1,32, "LAPPERSCRIPT DEVELOPMENT , Something with a Message System.");
EndEvent

Change that to:


#################################################
#Connect messages when a player joins the server#
#################################################

Event OnConnect( $userName ) # Player event
/*
$NickName = GetCurrentPlayerVar("NickName");
$Posabs = GetCurrentPlayerVar("PosAbs");
$Groupqual = GetCurrentPlayerVar("GroupQual");
openPrivButton( "welc",25,50,150,15,12,-1,ISB_NONE, langEngine("%{main_welc1}%", $NickName ) );
openPrivButton( "pos",25,80,150,10,8,-1,ISB_NONE,langEngine("%{main_welc2}%",$Posabs,$Posqual,$Groupqual ) );
openPrivButton( "clos",78,120,20,10,10,-1,ISB_DARK,langEngine("%{main_accept}%"),OnConnectClose );
openPrivButton( "ref",103,120,20,10,10,-1,ISB_DARK,langEngine("%{main_deny}%"),OnConnectCloseKick );
*/

#openPrivButton( "welc",0,0,200,5,12,-1,32, "LAPPERSCRIPT DEVELOPMENT , Something with a Message System.");
EndEvent

Yisc[NL]
S3 licensed
Quote from Tomfuel :must i transmit to rackservice the followed files :

- LFSLapper V7.0.6.4 publicTest_06.zip
and include in :
- LFSlapper.exe public test 10 B

?? Looking

Version 7.0.6.4 never made it to a public version (please correct me if I am wrong Bass-Driver) and must be considered a beta version.
If you are on 7.0.6.3 you are on the latest released version and should be able to do all you want to, including the flags we were talking about earlier in this thread.
FGED GREDG RDFGDR GSFDG